package org.squabble.web.account;

import java.io.Serializable;

import org.springmodules.validation.bean.conf.loader.annotation.handler.Email;
import org.springmodules.validation.bean.conf.loader.annotation.handler.Expression;
import org.springmodules.validation.bean.conf.loader.annotation.handler.Length;
import org.springmodules.validation.bean.conf.loader.annotation.handler.NotBlank;
import org.springmodules.validation.bean.conf.loader.annotation.handler.ValidatorRef;

@ValidatorRef("registerValidator")
public class RegisterCommand implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4732493330314765753L;

	@NotBlank
	@Email
	private String email;

	@Length(min = 6, max = 25)
	private String password;

	@NotBlank
	@Length(min = 3, max = 25)
	private String name;

	@NotBlank
	@Expression("verifyPassword equals password")
	private String verifyPassword;

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getVerifyPassword() {
		return verifyPassword;
	}

	public void setVerifyPassword(String verifyPassword) {
		this.verifyPassword = verifyPassword;
	}

}
